export function isRef(r) {
  return !!(r && r._v_isRef == true);
}
function toRaw(observed) {
  const raw = observed && observed["__v_raw"];
  return raw ? toRaw(raw) : observed;
}
function createDep(effects) {
  const dep = new Set(effects);
  dep.w = 0;
  dep.n = 0;
  return dep;
}
export function ref(value) {
  return createRef(value, false);
}

function createRef(rawValue, shallow) {
  if (isRef(rawValue)) {
    return rawValue;
  }
  return new RefImpl(rawValue, shallow);
}
class RefImpl {
  constructor(value, __v_isShallow) {
    this.__v_isShallow = __v_isShallow;
    this._v_isRef = true;
    this._value = value;
    this._rawValue = value;
  }
  get value() {
    console.log(222222);
    return this._value;
  }
  set value(newVal) {
    console.log("新值是newval", newVal);
  }
}
